package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.model.BCitiesDistance;
import cn.huiyunche.base.service.vo.BCitiesDistanceVo;
import cn.huiyunche.base.service.vo.PageVo;
import cn.huiyunche.base.service.vo.Result;

import java.math.BigDecimal;
import java.util.Map;

public interface BCitiesDistanceService {

    /**
     * 城市运距列表
     *
     * @param bCitiesDistanceVo
     * @return
     */
    Map<String, Object> list(PageVo page, BCitiesDistanceVo bCitiesDistanceVo);

    /**
     * 更新 城市运距
     *
     * @param bCitiesDistance
     * @return
     */
    Result<String> updateCityDistance(BCitiesDistance bCitiesDistance);

    /**
     * @param firstCityCode  城市编码
     * @param secondCityCode 城市编码
     * @param distance       距离
     * @Title: add
     * @Description: 新增
     * @return: Long 保存的id
     */
    Long add(String firstCityCode, String secondCityCode, BigDecimal distance);

    /**
     * @param firstCityCode  城市编码
     * @param secondCityCode 城市编码
     * @Title: getDistanceByCitiesCode
     * @Description: 根据城市编码获取距离
     * @return: BigDecimal
     */
    BigDecimal getDistanceByCitiesCode(String firstCityCode, String secondCityCode);
}
